public class TestTree {
    public static void main(String[] args) {
        TestBinaryTree testBinaryTree = new TestBinaryTree();
        TestBinaryTree.TreeNode root = testBinaryTree.createTree();
        testBinaryTree.preorder(testBinaryTree.root);
        System.out.println("");
        testBinaryTree.inorder(testBinaryTree.root);
        System.out.println("");
        testBinaryTree.postOrder(testBinaryTree.root);
        System.out.println("");
        System.out.println(testBinaryTree.size1(testBinaryTree.root));  //找节点个数
        System.out.println(testBinaryTree.getLeafSize2(testBinaryTree.root)); //找叶子节点个数
        testBinaryTree.getLeafSize1(testBinaryTree.root);  //方法计算叶子结点个
        System.out.println(TestBinaryTree.leafSize);
        System.out.println(testBinaryTree.getKLevelSize(testBinaryTree.root, 4)); //找第k层节点个数
        System.out.println(testBinaryTree.getHeight(testBinaryTree.root));  //求数的高度
        System.out.println(testBinaryTree.find(testBinaryTree.root,'A'));
        testBinaryTree.func(testBinaryTree.root);
    }
}
